Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve the issue of text editing not being effective before the table #5365

Merged
merged 4 commits into from
Feb 21, 2024

Conversation

LIlGG
Copy link
Member

@LIlGG LIlGG commented Feb 18, 2024

What type of PR is this?

/kind bug
/area editor
/area console

What this PR does / why we need it:

#5191 中对表格新增了如果可以左右滚动时,则显示阴影的特性。而根据 prosemirror 的数据流处理策略,在 decorations 中,state 是 new EditorState,但通过 this.editor.view 获取到的 view 为 old EditorView,进而导致使用了最新的坐标,并且使用其坐标通过旧版本的 view 中获取 DOM 而产生的错误。

本 PR 使用 NodeView 而不是 decorations 来重新处理表格阴影。

How to test it?

在默认富文本编辑器中新建一个表格。在表格前使用拼音输入文本,查看此文本能否被输入。
同时查看表格阴影是否存在

Which issue(s) this PR fixes:

Fixes #5352

Does this PR introduce a user-facing change?

解决默认富文本编辑器表格前字符无法被编辑的问题。

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Feb 18, 2024
@f2c-ci-robot f2c-ci-robot bot requested a review from QuentinHsu February 18, 2024 09:30
@f2c-ci-robot f2c-ci-robot bot added the area/editor Issues or PRs related to the Editor label Feb 18, 2024
@f2c-ci-robot f2c-ci-robot bot requested a review from wzrove February 18, 2024 09:30
@f2c-ci-robot f2c-ci-robot bot added the area/console Issues or PRs related to the Halo Console label Feb 18, 2024
Copy link

codecov bot commented Feb 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5fdf6c0) 56.91% compared to head (3dfd2f2) 56.90%.
Report is 15 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5365      +/-   ##
============================================
- Coverage     56.91%   56.90%   -0.01%     
+ Complexity     3319     3315       -4     
============================================
  Files           587      587              
  Lines         18968    18953      -15     
  Branches       1401     1399       -2     
============================================
- Hits          10795    10785      -10     
+ Misses         7594     7588       -6     
- Partials        579      580       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LIlGG
Copy link
Member Author

LIlGG commented Feb 19, 2024

/cherry-pick release-2.12

@halo-dev-bot
Copy link
Collaborator

@LIlGG: once the present PR merges, I will cherry-pick it on top of release-2.12 in a new PR and assign it to you.

In response to this:

/cherry-pick release-2.12

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@LIlGG LIlGG added this to the 2.13.x milestone Feb 19, 2024
Copy link

sonarcloud bot commented Feb 20, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@LIlGG LIlGG requested a review from guqing February 20, 2024 04:46
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works very well.

/approve

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 20, 2024
@JohnNiang
Copy link
Member

/ping @halo-dev/sig-halo

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 21, 2024
Copy link

f2c-ci-robot bot commented Feb 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guqing, JohnNiang, ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot merged commit ca4f705 into halo-dev:main Feb 21, 2024
8 checks passed
@halo-dev-bot
Copy link
Collaborator

@LIlGG: new pull request created: #5378

In response to this:

/cherry-pick release-2.12

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

f2c-ci-robot bot pushed a commit that referenced this pull request Feb 21, 2024
…tive before the table (#5378)

This is an automated cherry-pick of #5365

/assign LIlGG

```release-note
解决默认富文本编辑器表格前字符无法被编辑的问题。
```
@LIlGG LIlGG deleted the fix/text-editing-before-table branch February 21, 2024 04:35
@ruibaby ruibaby modified the milestones: 2.13.x, 2.13.0 Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/console Issues or PRs related to the Halo Console area/editor Issues or PRs related to the Editor kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

表格前的字符无法被修改
5 participants